package main

import (
	_ "classOne/models"
	_ "classOne/routers"
	"github.com/astaxie/beego"
	"strconv"
)

func main() {
	beego.AddFuncMap("ShowPrePage", HandlePerPage)
	beego.AddFuncMap("ShowNextPage", HandleNextPage)
	beego.Run()
}

func HandlePerPage(data int) string {

	pageIndex := (data - 1)
	return strconv.Itoa(pageIndex)
}

func HandleNextPage(data int) string {

	pageIndex := data + 1
	return strconv.Itoa(pageIndex)
}
